﻿using System;
using System.Data;
using System.Collections.Generic;
using OF.Model;
namespace OF.BLL.User
{
    /// <summary>
    /// Seller
    /// </summary>
    public partial class Seller:DAL.Seller
    {
        private readonly OF.DAL.Seller dal = new OF.DAL.Seller();
        DAL.SellerBelong dal_sc = new DAL.SellerBelong();
        public Seller()
        { }

        #region  ExtensionMethod
        public Model.Buyer GetBuyerModel(int id)
        {
            DAL.Buyer dal_buyer = new DAL.Buyer();
            return dal_buyer.GetModel(id);
        }
        public DataSet GetSchoolList() {
            DAL.School dal_sc = new DAL.School();
            return  dal_sc.GetList("");
        }
        public DataSet GetSchoolListBySeller(int sellerid)
        {
            return dal_sc.GetList(" sellerid=" + sellerid);
        }
        public bool DeleteSellerSchool(int sellerid)
        {
            return dal_sc.DeleteSellerSchool(sellerid);
        }
        public bool AddSellerSchool(int sellerid, string schoolid)
        {
            return dal_sc.Add(sellerid, schoolid) > 0 ? true : false;
        }

        #endregion  ExtensionMethod
    }
}

